//
//  XZHeaderImageView.h
//  ChatDemo-UI2.0
//
//  Created by zz on 16/4/29.
//  Copyright © 2016年 zz. All rights reserved.
//  自定义UIImageView，用来显示头像，当用户没有自定义头像的时候，显示用户昵称的后两位

#import <UIKit/UIKit.h>


@protocol XZHeaderImageViewDelegate <NSObject>

/**
 *  刷新头像
 *
 *  @param logoStr 头像地址
 *  @param pldStr  默认的placerholder
 */
-(void)updateCellWithLogoStr:(NSString *)logoStr andPlacerholder:(NSString *)pldStr;

@end

typedef void(^HeadImagePressed)();

@interface XZHeaderImageView : UIView

@property(nonatomic,strong) UIImageView *headImage; //头像

@property(nonatomic,strong) UILabel *namelabel; //昵称label

@property (nonatomic, copy) NSString *nameStr;

@property(nonatomic,assign) id<XZHeaderImageViewDelegate> delegate;

@property (nonatomic, copy) HeadImagePressed headPressed;

/**
 *  是否有自定义头像
 */
@property(nonatomic,assign) BOOL flag;

/**
 *  头像地址
 */
@property(nonatomic,copy) NSString *logoStr;

/**
 *  如果是yes的话，不在头像上添加button按钮
 */
@property(nonatomic,assign) BOOL headType;

-(void)updateViewWithLogoStr:(NSString *)logoStr;

-(void)headImagePressed:(UIGestureRecognizer *)tap;


@end
